package com.itheima.Demo2;

public class Test {
    public static void main(String[] args) {
        Cat cat = new Cat();
        cat.setName("花花");
        cat.setAge(2);
        System.out.println("这只猫的名字叫:" + cat.getName() + "  " + "年龄:" + cat.getAge() + "岁");
        cat.withPeople();
        Dog dog = new Dog();
        dog.setName("大黄");
        dog.setAge(5);
        System.out.println("这只狗的名字叫:" + dog.getName() + "  " + "年龄:" + dog.getAge() + "岁");
        dog.withPeople();
    }
}
